package cn.guo.service.impl;

import cn.guo.dao.IUserDao;
import cn.guo.entity.User;
import cn.guo.service.IUserService;



public class UserService implements IUserService {
	
	//注入dao【这里一定要用接口接收】
	private IUserDao userDao; //JDK
	public void setUserDao(IUserDao userDao) {
		this.userDao = userDao;
	}	

	public User login(User user) {
		return userDao.findByUser(user);
	}

	public void register(User user) {
		userDao.save(user);
	}

}
